package org.com.wlc;

import org.com.wlc.dao.HelloDao;
import org.com.wlc.service.AgeService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 */
public class App {
    public void test01(){
        ApplicationContext context = new ClassPathXmlApplicationContext("Spring.xml");
        AgeService ageService = (AgeService) context.getBean("ageServiceImpl");
        ageService.getAge();

        HelloDao helloDao =  (HelloDao)context.getBean("helloDao");
        helloDao.testHelloDao();
    }

    public void test02(){
        ApplicationContext context = new ClassPathXmlApplicationContext("Spring2.xml");
        AgeService ageService = (AgeService) context.getBean("ageServiceImpl");
        ageService.getAge();
    }
    public static void main(String[] args) {
      new App().test02();
    }


}
